import subprocess

result = subprocess.run(
    ["cmd", "/c", "echo Hello"],  # 通过cmd.exe执行内部命令
    capture_output=True,
    text=True
)
print(result.stdout)  # 输出: "Hello\r\n"
